<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('百度ECharts')"/>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-6">
            <div class="ibox">
                <div class="ibox-content">
                    <h5>就诊人数/总人数</h5>
                    <h2>[[${registeredMap.num}]]/[[${registeredMap.total}]]</h2>
                    <div class="text-center">
                        <div id="sparkline1"></div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
            <div class="ibox">
                <div class="ibox-content">
                    <h5>住院人数/总人数</h5>
                    <h2>[[${hospitalizedMap.num}]]/[[${hospitalizedMap.total}]]</h2>
                    <div class="text-center">
                        <div id="sparkline2"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: peity-js"/>
<th:block th:include="include :: sparkline-js"/>
<script type="text/javascript">
    $(function () {
        var registered_num = [[${registeredMap.num}]];
        var registered_total = [[${registeredMap.total}]];
        var hospitalized_num = [[${hospitalizedMap.num}]];
        var hospitalized_total = [[${hospitalizedMap.total}]];

        $("#sparkline1").sparkline([registered_num, registered_total], {
            type: 'pie',
            height: '140',
            sliceColors: ['#1ab394', '#F5F5F5']
        });
        $("#sparkline2").sparkline([hospitalized_num, hospitalized_total], {
            type: 'pie',
            height: '140',
            sliceColors: ['#ed5565', '#F5F5F5']
        });

    });
</script>
</body>
</html>